<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="js/angular.js"></script>
</head>
<body ng-app="app">
    <div ng-controller="controller1">
        <input type="text" ng-model="txt"  />
        <input type="text" ng-model="txt"  />
    </div>
    <div ng-controller='controller2'>
        <input type="text" ng-model="txt"  />
        <input type="text" ng-model="txt"  />
    </div>
</body>
<script>
    angular.module('app.subapp1',[]).controller('controller1',function($scope){
        $scope.txt='王伦';
    });
    angular.module('app.subapp2',[]).controller('controller2',function($scope){
        $scope.txt='小胖子';
    });
    angular.module('app',['app.subapp1','app.subapp2']);
</script>
</html>